<div class="aw-register-box" ng-app="registerApp" ng-controller="registerController">
    <div class="mod-head">
        <h1>注册新用户</h1>
    </div>
    <div class="mod-body">
        <form name="regForm" class="aw-register-form" ng-submit="postForm()">
            <ul>
                <li class="alert alert-danger hide error_message text-left">
                    <i class="fa fa-remove"></i><em></em>
                </li>
                <li>
                    <input class="aw-register-name form-control" type="text" name="name" placeholder="用户名" ng-model="formData.name"
                           ng-minlength="5" ng-maxlength="12"
                           ng-pattern="/^[a-zA-Z][a-zA-Z0-9_]{4,11}$/" required
                    >
                    <span ng-cloak ng-show="regForm.name.$invalid && !regForm.name.$pristine" class="aw-reg-tips aw-reg-err">
                        <i class="aw-icon i-err"></i>
                        用户名长度不符合
                    </span>
                </li>
                <li>
                    <input class="aw-register-email form-control" type="email"
                           ng-pattern="/^(\w)+(\.\w+)*@(\w)+((\.\w+)+)$/" placeholder="邮箱" name="email" ng-model="formData.email" required>
                    <span ng-cloak ng-show="regForm.email.$invalid && !regForm.email.$pristine" class="aw-reg-tips aw-reg-err">
                        <i class="aw-icon i-err"></i>
                        邮箱格式不正确
                    </span>
                </li>
                <li>
                    <input class="aw-register-pwd form-control" type="password"
                           ng-pattern="/(?!^\\d+$)(?!^[a-zA-Z]+$)(?!^[_#@]+$).{5,}/" ng-maxlength="12" name="password" placeholder="密码" ng-model="formData.password" required>
                    <span ng-cloak ng-show="regForm.password.$invalid && !regForm.password.$pristine"  class="aw-reg-tips aw-reg-err">
                        <i class="aw-icon i-err"></i>
                        密码格式不正确
                    </span>
                </li>
                <li class="last">
                    <label>
                        <input type="checkbox" checked="checked" value="agree" name="" required>我同意
                    </label>
                    <a href="#">用户协议</a>
                    <a href="/login" class="pull-right">已有账号</a>
                </li>
                <li class="clearfix">
                    <input type="submit" ng-disabled="regForm.$invalid" value="注册" class="btn btn-large btn-blue btn-block">
                </li>
            </ul>
        </form>
    </div>
    <div class="mod-footer" style="height:40px;">
        <div ng-show="error" id="errorbox" ng-cloak class="alert alert-danger" role="alert">
            {{error}}
        </div>
        <div ng-show="success" id="successbox" ng-cloak class="alert alert-success" role="alert">
            {{success}}
        </div>
    </div>
</div>
